#pragma once
#include <d3d9.h>

class DxVertexFormat
{
public:
	enum eVertexComponent
	{
		eVC_Position,
		eVC_Normal,
		eVC_TexCoord,
		eVC_BlendIndices,
		eVC_BlendWeights,
		eVC_Last,
	};

public:
	DxVertexFormat(void);
	~DxVertexFormat(void);

	int GetSize() { return m_iSize; }
	int GetOffset( eVertexComponent eVC) { return m_iOffsets[(int)eVC]; }

	IDirect3DVertexDeclaration9* GetDeclaration() { return m_pDeclaration; }

protected:
	IDirect3DVertexDeclaration9*		m_pDeclaration;
	int									m_iSize;
	int									m_iOffsets[(int)eVC_Last];
};

